package com.gmadmin.entity.dto;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.gmadmin.common.BaseEntity;
import com.gmadmin.entity.vo.role.SysRoleVo;
import com.gmadmin.service.dto.UnitOrganizationDto;
import com.gmadmin.service.dto.UnitPositionDto;
import com.gmadmin.service.vo.UnitOrganizationVo;
import com.gmadmin.service.vo.UnitPositionVo;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author zhangliang
 * @version 1.0
 * @date 2022/6/17 13:23
 */
public class SysUserDto extends BaseEntity {

    @ApiModelProperty(value = "用户id")
    private Long id;

    @ApiModelProperty(value = "用户名")
    private String username;
    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "性别")
    private String gender;

    @ApiModelProperty(value = "联系电话")
    private String phone;

    @ApiModelProperty(value = "电子邮箱")
    private String email;

    @ApiModelProperty(value = "头像名称")
    private String avatarName;

    @ApiModelProperty(value = "头像地址")
    private String avatarPath;

    @ApiModelProperty(value = "登录密码")
    private String password;

    @ApiModelProperty(value = "生日")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime birthday;

    @ApiModelProperty(value = "是否管理员")
    private Boolean admin;

    @ApiModelProperty(value = "状态：1启用、0禁用,2锁定，3密码过期，4，已注销")
    private String enabled;

    @ApiModelProperty(value = "用户状态,false禁用，true启用")
    private Boolean state;


    @ApiModelProperty(value = "密码重置时间")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",shape = JsonFormat.Shape.STRING)
    private LocalDateTime pwdResetTime;




    @ApiModelProperty(value = "用户角色")
    private List<SysRoleDto> roles;

    @ApiModelProperty(value = "组织")
    private List<UnitOrganizationDto> organizations;

    @ApiModelProperty(value = "职位")
    private List<UnitPositionDto> positions;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAvatarName() {
        return avatarName;
    }

    public void setAvatarName(String avatarName) {
        this.avatarName = avatarName;
    }

    public String getAvatarPath() {
        return avatarPath;
    }

    public void setAvatarPath(String avatarPath) {
        this.avatarPath = avatarPath;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    public LocalDateTime getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDateTime birthday) {
        this.birthday = birthday;
    }

    public Boolean getAdmin() {
        return admin;
    }

    public void setAdmin(Boolean admin) {
        this.admin = admin;
    }

    public String getEnabled() {
        return enabled;
    }

    public void setEnabled(String enabled) {
        this.enabled = enabled;
    }

    public Boolean getState() {
        return state;
    }

    public void setState(Boolean state) {
        this.state = state;
    }





    public LocalDateTime getPwdResetTime() {
        return pwdResetTime;
    }

    public void setPwdResetTime(LocalDateTime pwdResetTime) {
        this.pwdResetTime = pwdResetTime;
    }


    public List<SysRoleDto> getRoles() {
        return roles;
    }

    public void setRoles(List<SysRoleDto> roles) {
        this.roles = roles;
    }

    public List<UnitOrganizationDto> getOrganizations() {
        return organizations;
    }

    public void setOrganizations(List<UnitOrganizationDto> organizations) {
        this.organizations = organizations;
    }

    public List<UnitPositionDto> getPositions() {
        return positions;
    }

    public void setPositions(List<UnitPositionDto> positions) {
        this.positions = positions;
    }
}
